<?php

namespace Blog\Model;

use Common\Model\BaseModel;

class ArticleReplyModel extends BaseModel
{
    protected $_auto = array(
        array('create_time', NOW_TIME, self::MODEL_INSERT),
        array('update_time', NOW_TIME),
    );
    protected $_validate = array(
        ['content', 'require', '请输入内容',],
        ['nickname', 'require', '请输入称呼',],
        ['email', 'require', '请输入您的Email',],
        ['post_id', 'require', '请确定您要回复的文章',],
    );

    public function get_post_reply($post_id, $size = 10)
    {
        $list = $this->where(['post_id' => $post_id])->findPage($size);
        return $list;
    }
}